<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;

/**
 * App\Models\SysTopicRecommend
 *
 * @property int $id 自增ID
 * @property string $topic_id 话题ID
 * @property int $weight 排序权重
 * @property int $is_deleted 是否删除，0正常，1删除
 * @property int $created_at 创建时间戳
 * @property int $updated_at 更新时间戳
 * @property int $is_recommend 是否被设为推荐，0否，1是
 *
 * @method static \Illuminate\Database\Eloquent\Builder|SysTopicRecommend newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SysTopicRecommend newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|SysTopicRecommend query()
 * @mixin \Eloquent
 */
class SysTopicRecommend extends BaseModel
{
    use HasFactory;
    protected $table = "sys_topic_recommend";
    protected $primaryKey = "id";
    protected $keyType = "int";
    public $timestamps = true;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [];

    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = [
        'created_at' => 'timestamp',
        'updated_at' => 'timestamp',
    ];

    /**
     * select columns
     * @var array
     */
    public $fields = [
        'topicList' => ['topic_id']
    ];
}
